package bookManager.operations;

import bookManager.BookDao;
import bookManager.IOperation;

import java.util.Scanner;

public class ReturnOperation implements IOperation {
    @Override
    public void work() {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入要归还书的ID");
        int id=scanner.nextInt();

        BookDao bookDao=new BookDao();
        boolean ret=bookDao.returnBook(id);
        if(ret){
            System.out.println("还书成功");
        }else{
            System.out.println("还书失败");
        }
    }
}
